Optimal. Leaf size=292 \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \cot ^2(x)-2 \sqrt{\sqrt{2}-1} \cot (x)+\sqrt{2}\right )-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \cot ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \cot (x)+1\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (1-2 \sin ^2(x)\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (2 \sin ^2(x)-1\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19086, antiderivative size = 292, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {3209, 1169, 634, 618, 204, 628} \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \cot ^2(x)-2 \sqrt{\sqrt{2}-1} \cot (x)+\sqrt{2}\right )-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \cot ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \cot (x)+1\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (1-2 \sin ^2(x)\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{2}-1} \left (2 \sin ^2(x)-1\right )+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)}{\left (\sqrt{2}-2\right ) \sin ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3209
Rule 1169
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{1+\cos ^4(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1+x^2}{1+2 x^2+2 x^4} \, dx,x,\cot (x)\right )\\ &=-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}-\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}\\ &=\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{-\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\cot (x)\right )\\ &=\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \cot (x)+2 \cot ^2(x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \cot (x)+\sqrt{2} \cot ^2(x)\right )+\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,-\sqrt{-1+\sqrt{2}}+2 \cot (x)\right )+\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,\sqrt{-1+\sqrt{2}}+2 \cot (x)\right )\\ &=\frac{1}{2} \sqrt{1+\sqrt{2}} x-\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\left (2-\sqrt{2}\right ) \cos (x) \sin (x)-\sqrt{-1+\sqrt{2}} \left (1-2 \sin ^2(x)\right )}{2+\sqrt{1+\sqrt{2}}+2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)-\left (2-\sqrt{2}\right ) \sin ^2(x)}\right )-\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\left (2-\sqrt{2}\right ) \cos (x) \sin (x)+\sqrt{-1+\sqrt{2}} \left (1-2 \sin ^2(x)\right )}{2+\sqrt{1+\sqrt{2}}-2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)-\left (2-\sqrt{2}\right ) \sin ^2(x)}\right )+\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \cot (x)+2 \cot ^2(x)\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \cot (x)+\sqrt{2} \cot ^2(x)\right )\\ \end{align*}
Mathematica [C] time = 0.0698497, size = 45, normalized size = 0.15 \[ \frac{\tan ^{-1}\left (\frac{\tan (x)}{\sqrt{1-i}}\right )}{2 \sqrt{1-i}}+\frac{\tan ^{-1}\left (\frac{\tan (x)}{\sqrt{1+i}}\right )}{2 \sqrt{1+i}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.099, size = 227, normalized size = 0.8 \begin{align*}{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}-\tan \left ( x \right ) \sqrt{-2+2\,\sqrt{2}}+\sqrt{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) -\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }+{\frac{1}{2\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) -\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }-{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+\tan \left ( x \right ) \sqrt{-2+2\,\sqrt{2}}+\sqrt{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) +\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) }+{\frac{1}{2\,\sqrt{2\,\sqrt{2}+2}}\arctan \left ({\frac{2\,\tan \left ( x \right ) +\sqrt{-2+2\,\sqrt{2}}}{\sqrt{2\,\sqrt{2}+2}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\cos \left (x\right )^{4} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\cos \left (x\right )^{4} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]